package com.econ.springboot.tdengine.demo.multi.datasource.mybatis.plus.dao;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.econ.springboot.tdengine.demo.multi.datasource.mybatis.plus.domain.Weather;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;


@DS("tdengine")
@Repository
public interface WeatherMapper extends BaseMapper<Weather> {

    void dropDB();

    void createDB();

    void createSuperTable();

    void createTable(Weather weather);

    List<Weather> select(@Param("limit") Long limit, @Param("offset") Long offset);

    List<Weather> selectAll();

    int insert(Weather weather);

    int insertBatch(List<Weather> weatherList);

    int count();

    List<String> getSubTables();

    List<Weather> avg();
}
